<template>
    <div class="quarterly_report">
        <div class="xl-table-content">
            <xlTable
                    :columns="columns"
                    :dataSource="data"
                    rowKey="id"
                    :pagination="pagination"
                    :loading="loading"
                    @change="handleTableChange"
                    bordered
                    :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
                >
                <template v-slot:action="scope">
                    <a @click="seeForm(scope.record)">查看</a>
                </template>
            </xlTable>
        </div>
        <xlForm ref="xlForm" @handleOk="handleOk"></xlForm>
        <seeForm ref="seeForm"></seeForm>
    </div>
</template>

<script>

    import xlMixin from '../../mixin/index'
    export default {
        name: "index",
        mixins:[xlMixin],
        data(){
            return{
                paramMore:{
                    "newDevOrgId": ''
                },
                columns:[
                    {
                        title: '序号排序',
                        key: 'rowIndex',
                        align: "center",
                        fixed: 'left',
                        width:'180px',
                        sorter: (a) => a.id,//排序
                        customRender: function (t, r, index) {
                            return parseInt(index) + 1;
                        }
                    },
                    {
                        title: '股东名称',
                        dataIndex: 'shareholderName',
                        type:'input'
                    },
                    {
                        title: '股份占比',
                        dataIndex: 'shareProportion',
                        type:'input.number'
                    },
                    {
                        title: '实缴资本',
                        dataIndex: 'paidCapital',
                        type:'input.number'
                    },
                    {
                        title: '应缴资本',
                        dataIndex: 'payableCapital',
                        type:'input.number'
                    },
                    {
                        title: '操作',
                        dataIndex: 'action',
                        align: "center",
                        fixed: 'right',
                        width:'150px',
                        scopedSlots: {customRender: 'action'},
                    }
                ],
                // 请求参数
                url: {
                    list: "/ndo/api/ndo/shareholder/page/list",
                    add: '/ndo/api/ndo/shareholder/save',
                    edit: '/ndo/api/ndo/shareholder/save',
                    delete: "/ndo/api/ndo/shareholder/remove",
                    deleteBatch: "/company/batch/remove",
                    exportXlsUrl: "/ndo/api/ndo/finance/summary/exportExcel",
                    importExcelUrl: "/person/project/upload/cjjn"
                }
            }
        },
        props:{
            newDevOrgId:Number
        },
        created(){
            this.formatMerge()
            this.paramMore.newDevOrgId = this.newDevOrgId
            this.loading = true
            this.pageOnload()
        },
        watch:{
            newDevOrgId(){
                this.paramMore.newDevOrgId = this.newDevOrgId
                this.loading = true
                this.pageOnload()
            }
        },
        methods:{

        }
    }
</script>
<style scoped>

</style>
